BEGIN;
CREATE TABLE `admin_class` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `nam` varchar(128) NOT NULL UNIQUE
)
;
CREATE TABLE `admin_class_group` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `nam` varchar(128) NOT NULL,
    `cls_id` integer NOT NULL,
    `seq` integer,
    UNIQUE (`nam`, `cls_id`)
)
;
CREATE TABLE `admin_class_meta` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `nam` varchar(128) NOT NULL,
    `grp_id` integer NOT NULL,
    `cls_id` integer NOT NULL,
    `typ` varchar(64) NOT NULL,
    `seq` integer,
    UNIQUE (`nam`, `cls_id`)
)
;
COMMIT;